package com.zysc.processflow.service;

import com.zysc.processflow.entity.*;

import java.util.List;

public interface IProcessOperationService {


    //递归调用,有节点需要推动的时候执行一次
    //目前有四处调用这里
    //1.报警流程初始化后,会推动'开始节点',往后推一次
    //2.用户处置时,会推动'处置节点',往后推一次
    //3.消警时,会推动(因为未消警导致阻塞的'处置节点/逻辑节点'),往后推一次
    //4.定时任务会定期检查没有人员的流程节点,会推动一次没有处置人的节点
    Boolean pushNode(Handlerecord handlerecord, String nodeid);

    boolean pushBlockNodeByReason(Handlerecord record, String blockreason);

    Handleprocessnode getFirstNodeByProcess(Handleprocess process);

    Handleprocessnode getNextNode(String nodeid);

    List<Handleprocessline> getNextLineByNodeId(String nodeid);

    List<Handleprocessnode> getNextNodeByNodeId(String nodeid, Boolean thinkingOfConditionOnLine);

    List<Handleprocessnode> getPriorNodeByNodeId(String nodeid);

    Boolean updateCurrentnodeStatus(String recordid, String nodeid, String newStatus);

    List<Handleprocessnode> getCanNextNodeAndUpdateCannotNextNodeStatus(String recordid, String nodeid, Boolean thinkingOfConditionOnLine);

    Boolean getNodeConditionResult(Handleprocessline line, String recordid);

    List<Handlerecordcurrentnode> getPriorNodeList(String recordid, String nodeid);

    List<Handlerecordcurrentnode> getAllPriorNodeList(String recordid, String nodeid);

    boolean removeAllCurrentNodeByRecordId(String recordid);
}
